package com.gzx.asr.modular.text.service.impl;

import com.gzx.asr.modular.text.mapper.GzxAsrVoiceTextMapper;
import com.gzx.asr.modular.text.service.GzxAsrVoiceTextService;
import com.gzx.asr.modular.text.vo.GzxAsrVoiceTextVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xbl
 */
@Slf4j
@Service
public class GzxAsrVoiceTextServiceImpl implements GzxAsrVoiceTextService {

    private final GzxAsrVoiceTextMapper gzxAsrVoiceTextMapper;

    @Autowired
    public GzxAsrVoiceTextServiceImpl(GzxAsrVoiceTextMapper gzxAsrVoiceTextMapper) {
        this.gzxAsrVoiceTextMapper = gzxAsrVoiceTextMapper;
    }

    //每次获取上次处理之后的最大id
    @Override
    public int getMaxVoiceId() {
        return gzxAsrVoiceTextMapper.getMaxVoiceId();
    }

    @Override
    public void batchInsert(List<GzxAsrVoiceTextVo> textList) {
        gzxAsrVoiceTextMapper.batchInsert(textList);
    }


}
